using net_work.Common.Request;
using net_work.Common.Result;
using net_work.Data.DTO.Cou;
using net_work.Data.Entity.Cou;
using net_work.Data.VO.Cou;

namespace net_work.IRepository.Cou;

public interface ICourseRepository : IRepository<Course>
{
    /// <summary>
    /// 插入课程
    /// </summary>
    /// <param name="courseAddRequest">插入课程</param>
    /// <returns>课程ID</returns>
    Task<long> InsertAsync(CourseAddRequest courseAddRequest);

    /// <summary>
    /// 更新课程信息
    /// </summary>
    /// <param name="courseUpdateRequest">更新课程信息</param>
    /// <returns>是否成功</returns>
    Task<bool> UpdateAsync(CourseUpdateRequest courseUpdateRequest);
    
    /// <summary>
    /// 获取课程分页数据
    /// </summary>
    /// <param name="request">分页请求</param>
    /// <returns>课程列表</returns>
    Task<PagedResult<CourseResult>> GetCoursesPagedAsync(PagedRequest request);
}